#ifndef CHILD_INFO_H
#define CHILD_INFO_H

#include <QWidget>
#include <QSqlDatabase>
#include <QtDebug>
#include <QSqlQuery>
#include <QPushButton>
#include <QVector>
#include <QStringList>
#include <QMessageBox>

namespace Ui {
class child_info;
}

class child_info : public QWidget
{
    Q_OBJECT

public:
    explicit child_info(QWidget *parent = nullptr);
    ~child_info();

signals:
    void open_info(int);
    void sign_del(int);
    void open_new();
    void open_test(int, QString);

private:
    Ui::child_info *ui;
    QSqlDatabase sql;
    QVector<QPushButton *> btn_List[3];
    QStringList id_list;
    QStringList name_list;
    void Print_Rows(QSqlQuery &query);

private slots:
    void display_child_info();
    void detailed_info();
    void Ready_del();
    void del_child_info(int);
    void Ready_new();
    void Ready_test();
    void to_search();
};

#endif // CHILD_INFO_H
